<template>
  <div>
    <button @click="show = false">销毁</button>
    <!-- 学习生命周期 -->
    <my-header v-if="show"/>
  </div>
</template>

<script>
import MyHeader from './components/MyHeader.vue';
export default {
  components: {
    MyHeader
  },
  data() {
    return {
      show: true
    }
  },
}
</script>

<style></style>
